//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS Route53Profiles service.
///
///  With Amazon Route 53 Profiles you can share Route 53 configurations with VPCs and AWS accounts
public struct Route53Profiles: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the Route53Profiles client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "Route53Profiles",
            serviceIdentifier: "route53profiles",
            serviceProtocol: .restjson,
            apiVersion: "2018-05-10",
            endpoint: endpoint,
            variantEndpoints: Self.variantEndpoints,
            errorType: Route53ProfilesErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }




    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.dualstack]: .init(endpoints: [
            "af-south-1": "route53profiles.af-south-1.api.aws",
            "ap-east-1": "route53profiles.ap-east-1.api.aws",
            "ap-northeast-1": "route53profiles.ap-northeast-1.api.aws",
            "ap-northeast-2": "route53profiles.ap-northeast-2.api.aws",
            "ap-northeast-3": "route53profiles.ap-northeast-3.api.aws",
            "ap-south-1": "route53profiles.ap-south-1.api.aws",
            "ap-south-2": "route53profiles.ap-south-2.api.aws",
            "ap-southeast-1": "route53profiles.ap-southeast-1.api.aws",
            "ap-southeast-2": "route53profiles.ap-southeast-2.api.aws",
            "ap-southeast-3": "route53profiles.ap-southeast-3.api.aws",
            "ap-southeast-4": "route53profiles.ap-southeast-4.api.aws",
            "ca-central-1": "route53profiles.ca-central-1.api.aws",
            "ca-west-1": "route53profiles.ca-west-1.api.aws",
            "eu-central-1": "route53profiles.eu-central-1.api.aws",
            "eu-central-2": "route53profiles.eu-central-2.api.aws",
            "eu-north-1": "route53profiles.eu-north-1.api.aws",
            "eu-south-1": "route53profiles.eu-south-1.api.aws",
            "eu-south-2": "route53profiles.eu-south-2.api.aws",
            "eu-west-1": "route53profiles.eu-west-1.api.aws",
            "eu-west-2": "route53profiles.eu-west-2.api.aws",
            "eu-west-3": "route53profiles.eu-west-3.api.aws",
            "il-central-1": "route53profiles.il-central-1.api.aws",
            "me-central-1": "route53profiles.me-central-1.api.aws",
            "me-south-1": "route53profiles.me-south-1.api.aws",
            "sa-east-1": "route53profiles.sa-east-1.api.aws",
            "us-east-1": "route53profiles.us-east-1.api.aws",
            "us-east-2": "route53profiles.us-east-2.api.aws",
            "us-gov-east-1": "route53profiles.us-gov-east-1.api.aws",
            "us-gov-west-1": "route53profiles.us-gov-west-1.api.aws",
            "us-west-1": "route53profiles.us-west-1.api.aws",
            "us-west-2": "route53profiles.us-west-2.api.aws"
        ]),
        [.dualstack, .fips]: .init(endpoints: [
            "ca-central-1": "route53profiles-fips.ca-central-1.api.aws",
            "ca-west-1": "route53profiles-fips.ca-west-1.api.aws",
            "us-east-1": "route53profiles-fips.us-east-1.api.aws",
            "us-east-2": "route53profiles-fips.us-east-2.api.aws",
            "us-gov-east-1": "route53profiles-fips.us-gov-east-1.api.aws",
            "us-gov-west-1": "route53profiles-fips.us-gov-west-1.api.aws",
            "us-west-1": "route53profiles-fips.us-west-1.api.aws",
            "us-west-2": "route53profiles-fips.us-west-2.api.aws"
        ])
    ]}

    // MARK: API Calls

    ///  Associates a Route 53 Profiles profile with a VPC. A VPC can have only one Profile associated with it, but a Profile can be associated with 1000 of VPCs (and you can request a higher quota).  For more information, see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html#limits-api-entities.
    @Sendable
    @inlinable
    public func associateProfile(_ input: AssociateProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> AssociateProfileResponse {
        try await self.client.execute(
            operation: "AssociateProfile", 
            path: "/profileassociation", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Associates a Route 53 Profiles profile with a VPC. A VPC can have only one Profile associated with it, but a Profile can be associated with 1000 of VPCs (and you can request a higher quota).  For more information, see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html#limits-api-entities.
    ///
    /// Parameters:
    ///   - name:  A name for the association.
    ///   - profileId:  ID of the Profile.
    ///   - resourceId:  The ID of the VPC.
    ///   - tags:  A list of the tag keys and values that you want to identify the Profile association.
    ///   - logger: Logger use during operation
    @inlinable
    public func associateProfile(
        name: String,
        profileId: String,
        resourceId: String,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> AssociateProfileResponse {
        let input = AssociateProfileRequest(
            name: name, 
            profileId: profileId, 
            resourceId: resourceId, 
            tags: tags
        )
        return try await self.associateProfile(input, logger: logger)
    }

    ///  Associates a DNS reource configuration to a Route 53 Profile.
    @Sendable
    @inlinable
    public func associateResourceToProfile(_ input: AssociateResourceToProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> AssociateResourceToProfileResponse {
        try await self.client.execute(
            operation: "AssociateResourceToProfile", 
            path: "/profileresourceassociation", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Associates a DNS reource configuration to a Route 53 Profile.
    ///
    /// Parameters:
    ///   - name:  Name for the resource association.
    ///   - profileId:  ID of the Profile.
    ///   - resourceArn:  Amazon resource number, ARN, of the DNS resource.
    ///   - resourceProperties:  If you are adding a DNS Firewall rule group, include also a priority. The priority indicates the processing order for the rule groups, starting with the priority assinged the lowest value.
    ///   - logger: Logger use during operation
    @inlinable
    public func associateResourceToProfile(
        name: String,
        profileId: String,
        resourceArn: String,
        resourceProperties: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> AssociateResourceToProfileResponse {
        let input = AssociateResourceToProfileRequest(
            name: name, 
            profileId: profileId, 
            resourceArn: resourceArn, 
            resourceProperties: resourceProperties
        )
        return try await self.associateResourceToProfile(input, logger: logger)
    }

    ///  Creates an empty Route 53 Profile.
    @Sendable
    @inlinable
    public func createProfile(_ input: CreateProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateProfileResponse {
        try await self.client.execute(
            operation: "CreateProfile", 
            path: "/profile", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Creates an empty Route 53 Profile.
    ///
    /// Parameters:
    ///   - clientToken:  ClientToken is an idempotency token that ensures a call to CreateProfile completes only once. You choose the value to pass.  For example, an issue might prevent you from getting a response from CreateProfile.  In this case, safely retry your call to CreateProfile by using the same CreateProfile parameter value.
    ///   - name:  A name for the Profile.
    ///   - tags:  A list of the tag keys and values that you want to associate with the Route 53 Profile.
    ///   - logger: Logger use during operation
    @inlinable
    public func createProfile(
        clientToken: String = CreateProfileRequest.idempotencyToken(),
        name: String,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateProfileResponse {
        let input = CreateProfileRequest(
            clientToken: clientToken, 
            name: name, 
            tags: tags
        )
        return try await self.createProfile(input, logger: logger)
    }

    ///  Deletes the specified Route 53 Profile. Before you can delete a profile, you must first disassociate it from all VPCs.
    @Sendable
    @inlinable
    public func deleteProfile(_ input: DeleteProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteProfileResponse {
        try await self.client.execute(
            operation: "DeleteProfile", 
            path: "/profile/{ProfileId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Deletes the specified Route 53 Profile. Before you can delete a profile, you must first disassociate it from all VPCs.
    ///
    /// Parameters:
    ///   - profileId:  The ID of the Profile that you want to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteProfile(
        profileId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteProfileResponse {
        let input = DeleteProfileRequest(
            profileId: profileId
        )
        return try await self.deleteProfile(input, logger: logger)
    }

    ///  Dissociates a specified Route 53 Profile from the specified VPC.
    @Sendable
    @inlinable
    public func disassociateProfile(_ input: DisassociateProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DisassociateProfileResponse {
        try await self.client.execute(
            operation: "DisassociateProfile", 
            path: "/profileassociation/Profileid/{ProfileId}/resourceid/{ResourceId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Dissociates a specified Route 53 Profile from the specified VPC.
    ///
    /// Parameters:
    ///   - profileId:  ID of the Profile.
    ///   - resourceId:  The ID of the VPC.
    ///   - logger: Logger use during operation
    @inlinable
    public func disassociateProfile(
        profileId: String,
        resourceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DisassociateProfileResponse {
        let input = DisassociateProfileRequest(
            profileId: profileId, 
            resourceId: resourceId
        )
        return try await self.disassociateProfile(input, logger: logger)
    }

    ///  Dissoaciated a specified resource, from the Route 53 Profile.
    @Sendable
    @inlinable
    public func disassociateResourceFromProfile(_ input: DisassociateResourceFromProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DisassociateResourceFromProfileResponse {
        try await self.client.execute(
            operation: "DisassociateResourceFromProfile", 
            path: "/profileresourceassociation/profileid/{ProfileId}/resourcearn/{ResourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Dissoaciated a specified resource, from the Route 53 Profile.
    ///
    /// Parameters:
    ///   - profileId:  The ID of the Profile.
    ///   - resourceArn: The Amazon Resource Name (ARN) of the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func disassociateResourceFromProfile(
        profileId: String,
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DisassociateResourceFromProfileResponse {
        let input = DisassociateResourceFromProfileRequest(
            profileId: profileId, 
            resourceArn: resourceArn
        )
        return try await self.disassociateResourceFromProfile(input, logger: logger)
    }

    ///  Returns information about a specified Route 53 Profile, such as whether whether the Profile is shared, and the current status of the Profile.
    @Sendable
    @inlinable
    public func getProfile(_ input: GetProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetProfileResponse {
        try await self.client.execute(
            operation: "GetProfile", 
            path: "/profile/{ProfileId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Returns information about a specified Route 53 Profile, such as whether whether the Profile is shared, and the current status of the Profile.
    ///
    /// Parameters:
    ///   - profileId:  ID of the Profile.
    ///   - logger: Logger use during operation
    @inlinable
    public func getProfile(
        profileId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetProfileResponse {
        let input = GetProfileRequest(
            profileId: profileId
        )
        return try await self.getProfile(input, logger: logger)
    }

    ///  Retrieves a Route 53 Profile association for a VPC. A VPC can have only one Profile association, but a Profile can be associated with up to 5000 VPCs.
    @Sendable
    @inlinable
    public func getProfileAssociation(_ input: GetProfileAssociationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetProfileAssociationResponse {
        try await self.client.execute(
            operation: "GetProfileAssociation", 
            path: "/profileassociation/{ProfileAssociationId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves a Route 53 Profile association for a VPC. A VPC can have only one Profile association, but a Profile can be associated with up to 5000 VPCs.
    ///
    /// Parameters:
    ///   - profileAssociationId:  The identifier of the association you want to get information about.
    ///   - logger: Logger use during operation
    @inlinable
    public func getProfileAssociation(
        profileAssociationId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetProfileAssociationResponse {
        let input = GetProfileAssociationRequest(
            profileAssociationId: profileAssociationId
        )
        return try await self.getProfileAssociation(input, logger: logger)
    }

    ///  Returns information about a specified Route 53 Profile resource association.
    @Sendable
    @inlinable
    public func getProfileResourceAssociation(_ input: GetProfileResourceAssociationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetProfileResourceAssociationResponse {
        try await self.client.execute(
            operation: "GetProfileResourceAssociation", 
            path: "/profileresourceassociation/{ProfileResourceAssociationId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Returns information about a specified Route 53 Profile resource association.
    ///
    /// Parameters:
    ///   - profileResourceAssociationId:   The ID of the profile resource association that you want to get information about.
    ///   - logger: Logger use during operation
    @inlinable
    public func getProfileResourceAssociation(
        profileResourceAssociationId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetProfileResourceAssociationResponse {
        let input = GetProfileResourceAssociationRequest(
            profileResourceAssociationId: profileResourceAssociationId
        )
        return try await self.getProfileResourceAssociation(input, logger: logger)
    }

    ///  Lists all the VPCs that the specified Route 53 Profile is associated with.
    @Sendable
    @inlinable
    public func listProfileAssociations(_ input: ListProfileAssociationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListProfileAssociationsResponse {
        try await self.client.execute(
            operation: "ListProfileAssociations", 
            path: "/profileassociations", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Lists all the VPCs that the specified Route 53 Profile is associated with.
    ///
    /// Parameters:
    ///   - maxResults:  The maximum number of objects that you want to return for this request. If more objects are available, in the response,  a NextToken value, which you can use in a subsequent call to get the next batch of objects, is provided.  If you don't specify a value for MaxResults, up to 100 objects are returned.
    ///   - nextToken:  For the first call to this list request, omit this value.
    ///   - profileId: ID of the Profile.
    ///   - resourceId:  ID of the VPC.
    ///   - logger: Logger use during operation
    @inlinable
    public func listProfileAssociations(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        profileId: String? = nil,
        resourceId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListProfileAssociationsResponse {
        let input = ListProfileAssociationsRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            profileId: profileId, 
            resourceId: resourceId
        )
        return try await self.listProfileAssociations(input, logger: logger)
    }

    ///  Lists all the resource associations for the specified Route 53 Profile.
    @Sendable
    @inlinable
    public func listProfileResourceAssociations(_ input: ListProfileResourceAssociationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListProfileResourceAssociationsResponse {
        try await self.client.execute(
            operation: "ListProfileResourceAssociations", 
            path: "/profileresourceassociations/profileid/{ProfileId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Lists all the resource associations for the specified Route 53 Profile.
    ///
    /// Parameters:
    ///   - maxResults:  The maximum number of objects that you want to return for this request. If more objects are available, in the response,  a NextToken value, which you can use in a subsequent call to get the next batch of objects, is provided.  If you don't specify a value for MaxResults, up to 100 objects are returned.
    ///   - nextToken:  For the first call to this list request, omit this value.  When you request a list of objects, at most the number of objects specified by MaxResults is returned.  If more objects are available for retrieval, a NextToken value is returned in the response.  To retrieve the next batch of objects, use the token that was returned for the prior request in your next request.
    ///   - profileId: The ID of the Profile.
    ///   - resourceType:  ID of a resource if you want information on only one type.
    ///   - logger: Logger use during operation
    @inlinable
    public func listProfileResourceAssociations(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        profileId: String,
        resourceType: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListProfileResourceAssociationsResponse {
        let input = ListProfileResourceAssociationsRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            profileId: profileId, 
            resourceType: resourceType
        )
        return try await self.listProfileResourceAssociations(input, logger: logger)
    }

    ///  Lists all the Route 53 Profiles associated with your Amazon Web Services account.
    @Sendable
    @inlinable
    public func listProfiles(_ input: ListProfilesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListProfilesResponse {
        try await self.client.execute(
            operation: "ListProfiles", 
            path: "/profiles", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Lists all the Route 53 Profiles associated with your Amazon Web Services account.
    ///
    /// Parameters:
    ///   - maxResults:  The maximum number of objects that you want to return for this request. If more objects are available, in the response,  a NextToken value, which you can use in a subsequent call to get the next batch of objects, is provided.  If you don't specify a value for MaxResults, up to 100 objects are returned.
    ///   - nextToken:  For the first call to this list request, omit this value.  When you request a list of objects, at most the number of objects specified by MaxResults is returned.  If more objects are available for retrieval, a NextToken value is returned in the response.  To retrieve the next batch of objects, use the token that was returned for the prior request in your next request.
    ///   - logger: Logger use during operation
    @inlinable
    public func listProfiles(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListProfilesResponse {
        let input = ListProfilesRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listProfiles(input, logger: logger)
    }

    ///  Lists the tags that you associated with the specified resource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Lists the tags that you associated with the specified resource.
    ///
    /// Parameters:
    ///   - resourceArn:  The Amazon Resource Name (ARN) for the resource that you want to list the tags for.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    ///  Adds one or more tags to a specified resource.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Adds one or more tags to a specified resource.
    ///
    /// Parameters:
    ///   - resourceArn:  The Amazon Resource Name (ARN) for the resource that you want to add tags to.
    ///   - tags:  The tags that you want to add to the specified resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    ///  Removes one or more tags from a specified resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Removes one or more tags from a specified resource.
    ///
    /// Parameters:
    ///   - resourceArn:  The Amazon Resource Name (ARN) for the resource that you want to remove tags from.
    ///   - tagKeys:  The tags that you want to remove to the specified resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates the specified Route 53 Profile resourse association.
    @Sendable
    @inlinable
    public func updateProfileResourceAssociation(_ input: UpdateProfileResourceAssociationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateProfileResourceAssociationResponse {
        try await self.client.execute(
            operation: "UpdateProfileResourceAssociation", 
            path: "/profileresourceassociation/{ProfileResourceAssociationId}", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the specified Route 53 Profile resourse association.
    ///
    /// Parameters:
    ///   - name: Name of the resource association.
    ///   - profileResourceAssociationId: ID of the resource association.
    ///   - resourceProperties:  If you are adding a DNS Firewall rule group, include also a priority. The priority indicates the processing order for the rule groups, starting with the priority assinged the lowest value.  The allowed values for priority are between 100 and 9900.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateProfileResourceAssociation(
        name: String? = nil,
        profileResourceAssociationId: String,
        resourceProperties: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateProfileResourceAssociationResponse {
        let input = UpdateProfileResourceAssociationRequest(
            name: name, 
            profileResourceAssociationId: profileResourceAssociationId, 
            resourceProperties: resourceProperties
        )
        return try await self.updateProfileResourceAssociation(input, logger: logger)
    }
}

extension Route53Profiles {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: Route53Profiles, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Route53Profiles {
    /// Return PaginatorSequence for operation ``listProfileAssociations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfileAssociationsPaginator(
        _ input: ListProfileAssociationsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListProfileAssociationsRequest, ListProfileAssociationsResponse> {
        return .init(
            input: input,
            command: self.listProfileAssociations,
            inputKey: \ListProfileAssociationsRequest.nextToken,
            outputKey: \ListProfileAssociationsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listProfileAssociations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults:  The maximum number of objects that you want to return for this request. If more objects are available, in the response,  a NextToken value, which you can use in a subsequent call to get the next batch of objects, is provided.  If you don't specify a value for MaxResults, up to 100 objects are returned.
    ///   - profileId: ID of the Profile.
    ///   - resourceId:  ID of the VPC.
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfileAssociationsPaginator(
        maxResults: Int? = nil,
        profileId: String? = nil,
        resourceId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListProfileAssociationsRequest, ListProfileAssociationsResponse> {
        let input = ListProfileAssociationsRequest(
            maxResults: maxResults, 
            profileId: profileId, 
            resourceId: resourceId
        )
        return self.listProfileAssociationsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listProfileResourceAssociations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfileResourceAssociationsPaginator(
        _ input: ListProfileResourceAssociationsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListProfileResourceAssociationsRequest, ListProfileResourceAssociationsResponse> {
        return .init(
            input: input,
            command: self.listProfileResourceAssociations,
            inputKey: \ListProfileResourceAssociationsRequest.nextToken,
            outputKey: \ListProfileResourceAssociationsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listProfileResourceAssociations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults:  The maximum number of objects that you want to return for this request. If more objects are available, in the response,  a NextToken value, which you can use in a subsequent call to get the next batch of objects, is provided.  If you don't specify a value for MaxResults, up to 100 objects are returned.
    ///   - profileId: The ID of the Profile.
    ///   - resourceType:  ID of a resource if you want information on only one type.
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfileResourceAssociationsPaginator(
        maxResults: Int? = nil,
        profileId: String,
        resourceType: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListProfileResourceAssociationsRequest, ListProfileResourceAssociationsResponse> {
        let input = ListProfileResourceAssociationsRequest(
            maxResults: maxResults, 
            profileId: profileId, 
            resourceType: resourceType
        )
        return self.listProfileResourceAssociationsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listProfiles(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfilesPaginator(
        _ input: ListProfilesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListProfilesRequest, ListProfilesResponse> {
        return .init(
            input: input,
            command: self.listProfiles,
            inputKey: \ListProfilesRequest.nextToken,
            outputKey: \ListProfilesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listProfiles(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults:  The maximum number of objects that you want to return for this request. If more objects are available, in the response,  a NextToken value, which you can use in a subsequent call to get the next batch of objects, is provided.  If you don't specify a value for MaxResults, up to 100 objects are returned.
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfilesPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListProfilesRequest, ListProfilesResponse> {
        let input = ListProfilesRequest(
            maxResults: maxResults
        )
        return self.listProfilesPaginator(input, logger: logger)
    }
}

extension Route53Profiles.ListProfileAssociationsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Route53Profiles.ListProfileAssociationsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            profileId: self.profileId,
            resourceId: self.resourceId
        )
    }
}

extension Route53Profiles.ListProfileResourceAssociationsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Route53Profiles.ListProfileResourceAssociationsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            profileId: self.profileId,
            resourceType: self.resourceType
        )
    }
}

extension Route53Profiles.ListProfilesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Route53Profiles.ListProfilesRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
